﻿#include "mainwindow.h"

#include <QApplication>

int main(int argc, char *argv[])
{

    // DBG
    qSetMessagePattern("[%{time yyyyMMdd h:mm:ss.zzz} "
                       "%{if-debug}\033[34mDbg\033[0m%{endif}"
                       "%{if-info}\033[32mInfo\033[0m%{endif}"
                       "%{if-warning}\033[31mWarn\033[0m%{endif}] "
                       "%{file}:%{line}"
                       "#>> "
                       "%{if-info}\033[32m%{message}\033[0m%{endif}"
                       "%{if-warning}\033[31m%{message}\033[0m%{endif}"
                       "%{if-debug}%{message}%{endif}");

    qputenv("QT_ENABLE_HIGHDPI_SCALING", "1");
    QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);

    //控制图片缩放质量
    QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);

    QApplication a(argc, argv);
    MainWindow w;
    w.show();
    return a.exec();
}
